package com.jlz.beans.core;

import java.util.List;
import java.util.Map;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.jlz.beans.def.DivisionBean;
import com.julewa.db.DB;
import com.julewa.db.Entity;

/*
 * 资产信息结构
 * 也包括求租信息
 * 
 * 求租可以看做负资产
 * 
 * 对每一个category,将创建五个表
 * 
 * asset
 * proxy
 * 
 * desire
 * 
 * contract
 * 
 * message
 * price
 * 
 */
@DB.DYNAMIC
@Component @Scope(Entity.SCOPE)
public class AssetBean extends Dynamic<Long> {
	
	
	//分类
	@DB.COLUMN int categoryId;
	//拥有者
	@DB.COLUMN long ownerId;
	@DB.COLUMN String ownerName;//适度冗余

	//资产-代理资产-求租
	@DB.COLUMN int type;
	
	//状态, 新建-发布-关闭-删除
	@DB.COLUMN int state;
	
	//基本信息
	@DB.COLUMN String title;//基本标题
	@DB.COLUMN long divisionId;//位置
	DivisionBean division = null;
	@DB.COLUMN String address;//详细地址,若是求租,则为求租地址方面的其他要求
	
	@DB.COLUMN int count;//个数,出租个数或求租个数
	//创建日期
	@DB.COLUMN long createDate;
	
	//关键的价格规则定义
	List<PriceBean> prices = null;
	
	//其他规则的定义
	//这里的数据是直接以C_XX的方式放在同一个表中
	Map<String, Object> properties = null;
	
	//TODO 评价体系,将是最核心的算法
	//暂不用,需要很多因素考量
	@DB.COLUMN int good;//质量或诚意
	@DB.COLUMN int real;//真实性
	@DB.COLUMN int evalCount;//评价数
	
	
	public Map<String, Object> getProperties() {
		return properties;
	}
	public void setProperties(Map<String, Object> properties) {
		this.properties = properties;
	}
	//
	public int getCategoryId() {
		return categoryId;
	}
	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}
	public long getOwnerId() {
		return ownerId;
	}
	public void setOwnerId(long ownerId) {
		this.ownerId = ownerId;
	}
	public String getOwnerName() {
		return ownerName;
	}
	public void setOwnerName(String ownerName) {
		this.ownerName = ownerName;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public long getDivisionId() {
		return divisionId;
	}
	public void setDivisionId(long divisionId) {
		this.divisionId = divisionId;
	}
	public DivisionBean getDivision() {
		return division;
	}
	public void setDivision(DivisionBean division) {
		this.division = division;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public long getCreateDate() {
		return createDate;
	}
	public void setCreateDate(long createDate) {
		this.createDate = createDate;
	}
	public List<PriceBean> getPrices() {
		return prices;
	}
	public void setPrices(List<PriceBean> prices) {
		this.prices = prices;
	}
	public int getGood() {
		return good;
	}
	public void setGood(int good) {
		this.good = good;
	}
	public int getReal() {
		return real;
	}
	public void setReal(int real) {
		this.real = real;
	}
	public int getEvalCount() {
		return evalCount;
	}
	public void setEvalCount(int evalCount) {
		this.evalCount = evalCount;
	}
	
	
}
